from flask_swagger import swagger
from flask import jsonify
from apps import create_app

app = create_app()


@app.route("/api/spec")
def spec():
  swag = swagger(app, prefix='/api')
  swag['info']['base'] = "http://192.168.5.10:5000"
  swag['info']['version'] = "2.0"
  swag['info']['title'] = 'Flask API Docs'
  return jsonify(swag)


@app.route("/")
def index():
  return app.send_static_file('index.html')


if __name__ == '__main__':
  app.run(debug=True, host='0.0.0.0', port=5000)
